<?php
/**
 * Created by  青岛火一五信息科技有限公司
 * author: Zane
 * QQ  : 3186355915
 * Date: 2019/4/27
 * Time: 01:18
 */

namespace LaravelPatterns;


class TrafficToolFactory
{
    public function createTool($name)
    {
        switch ($name) {
            case 'Leg':
                return new Leg();
                break;
            case 'Car':
                return new Car();
                break;
        }
    }
}